<li class="sequence" id="item_1">
<% fields_for "definition[sequences][]", sequence do |sequence_form| %>
  <%= enable_sorting %>
  <h3>Sequence</h3>
  <label>Start Position</label><%= sequence_form.text_field :position, :index => nil %>
  <label>Increment</label><%= sequence_form.text_field :inc, :index => nil %>
  <label>Sequence Dimension</label><%= sequence_form.text_field :seq_dimension, :index => nil %>
    <%= sequence_form.hidden_field :type, :index => nil,:value => "Sequence" %>
    <%= sequence_form.hidden_field :pos_num, :index => nil %>
    <p>
    <% if sequence.new_record? %>
        <%= link_to_function "remove", "this.up('.sequence').remove()" %>
    <% else %>
      <%= link_to_function "remove", "mark_for_destroy(this, '.sequence')" %>
      <%= sequence_form.hidden_field :id, :index => nil %>
      <%= sequence_form.hidden_field :should_destroy,
          :index => nil, :class => "should_destroy"%>
    <% end %>
  </p>
    <% end %>
</li>